* Replicates all the results presented in the appendix

* load data
*use "d.dta", clear

*************************************************************************
* Table A2: Descriptive Stats of Partisan Bands

gen bands_PCIsoc = 0
replace bands_PCIsoc = 1 if bands_PCI == 1 | bands_socialist == 1

order bands0943_0444 bands1944 bands1945 bands 

outreg2 using "bands", sum(log) replace tex eqkeep(mean sd min max N) ///
             dec(3) keep(bands0943_0444 bands1944 bands1945 bands bands_PCI bands_socialist) label

*************************************************************************
* Table A3: Descriptives of Main Variables

label var numerofirme "Signatures"
label var bands "Resistance"
label var pop2021 "Population Size"
label var densita_x_km2 "Population Density"
label var old_11 "Older than 65"
label var Tassodidisoccupazione "Unemployment" 
label var perc_man_01 "Manual Workers"
label var perc_agr_01 "Agricultural Workers"
label var share_university_cens2011 "University Graduates"
label var digital_divide_rf "Broadband Internet"
label var mountain_perc "Mountainous Terrain"

order numerofirme bands pop2021 densita_x_km2 old_11 Tassodidisoccupazione perc_man_01 perc_agr_01 share_university_cens2011 digital_divide_rf mountain_perc

outreg2 using "des_all", sum(log) replace tex eqkeep(mean sd min max N) ///
             dec(2) keep(numerofirme bands pop2021 densita_x_km2 old_11 Tassodidisoccupazione perc_man_01 perc_agr_01 share_university_cens2011 digital_divide_rf mountain_perc) label
			 
*************************************************************************
* Table A4: Descriptive Statistics of Pre-war Controls

label var dlab1921 "Day Laborers"
label var shcrop1921 "Sharecroppers" 
label var ind_workers1921 "Industrial Workers"
label var literacy1911 "Literacy 1911"
label var sh_pop_1911 "Younger than 6"
label var psu1919_vv "Socialist Vote 1919" 

order dlab1921 shcrop1921 ind_workers1921 literacy1911 sh_pop_1911_be6 psu1919_vv

outreg2 using "des_prewar", sum(log) replace tex eqkeep(mean sd min max N) ///
             dec(2) keep(dlab1921 shcrop1921 ind_workers1921 literacy1911 sh_pop_1911_be6 psu1919_vv) label
			 
*************************************************************************
* Table A5: Baseline Model and Robustness to Model Specification
est clear				   
foreach cntrls in "" ///
                  "pop2021 densita_x_km2" ///
                  "pop2021 densita_x_km2 old_11 share_university_cens2011" ///
				  "pop2021 densita_x_km2 old_11 share_university_cens2011 Tassodidisoccupazione perc_man_01 perc_agr_01" ///
				  "pop2021 densita_x_km2 old_11 share_university_cens2011 Tassodidisoccupazione perc_man_01 perc_agr_01 digital_divide_rf" ///
				  "pop2021 densita_x_km2 old_11 share_university_cens2011 Tassodidisoccupazione perc_man_01 perc_agr_01 digital_divide_rf mountain_perc" {

qui eststo: nbreg numerofirme bands `cntrls' i.COD_PROV if pop2021 < 25000 & resistent_region == 1, cl(COD_PROV)
 }
			 
esttab using "main_model.tex", replace b(%8.3f) se(%8.3f) noomitted nocons nobaselev stats(N, fmt(0 2)) title (Estimated Coefficients for Baseline Negative Binomial Model of Municipal Signature Number.) drop(*.COD_PROV) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label

**********************************************************************
* Table A6: Negative Binomial & IHS estimates with different spatial controls

est clear

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc c.latitude c.longitude if pop2021 < 25000 & resistent_region == 1, robust

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc c.latitude c.longitude, robust

eststo: reg ihs_wsign bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc c.latitude c.longitude if pop2021 < 25000 & resistent_region == 1, robust

eststo: reg ihs_wsign bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc c.latitude c.longitude, robust

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc i.COD_PROV if pop2021 < 25000 & resistent_region == 1, cl(COD_PROV)

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc i.COD_PROV if pop2021 <100000, cl(COD_PROV)

eststo: reghdfe ihs_wsign bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc if pop2021 < 25000 & resistent_region == 1, cl(COD_PROV) absorb(COD_PROV)

eststo: reghdfe ihs_wsign bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc, cl(COD_PROV) absorb(COD_PROV)

esttab using "ihs_models.tex", replace b(%8.3f) se(%8.3f) noomitted nocons nobaselev stats(N, fmt(0 2)) keep(bands) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label
		  
************************************************************************
* Table A7: Estimates using all Italian municipalities
* Models with province fixed effects exclude municipalities above 100.000 to achieve convergence
		  
est clear

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc c.latitude##c.longitude if pop2021 < 25000, robust

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc c.latitude##c.longitude if resistent_region == 1, robust

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc c.latitude##c.longitude, robust

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc i.COD_PROV if pop2021 < 25000, cl(COD_PROV)

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc i.COD_PROV if pop2021 < 100000 & resistent_region == 1, cl(COD_PROV)

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc i.COD_PROV if pop2021 < 100000, cl(COD_PROV)

esttab using "all_municipalities.tex", replace b(%8.3f) se(%8.3f) noomitted nocons nobaselev stats(N, fmt(0 2)) keep(bands) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label

*************************************************************************
* Table A8: Model with pre-war controls

est clear

foreach cntrls in "psu1913_vv" "psu1919_vv" "psu1921_vv" "psu1924_vv" {

qui eststo: nbreg numerofirme bands pop2021 `cntrls' dlab1921 shcrop1921 ind_workers1921 literacy1911 sh_pop_1911_be6 c.mountain_perc i.COD_PROV if pop2021 < 25000 & resistent_region == 1, cl(COD_PROV)

}

esttab using "prewar_controls.tex", replace b(%8.3f) se(%8.3f) noomitted nocons nobaselev stats(N, fmt(0 2)) drop(*.COD_PROV)   star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label

*************************************************************************
* Table A9: Voting in the 2020 referendum

est clear

foreach var of varlist ref2020_turnout ref2020_yes {
		
quiet eststo:	reg `var' i.bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc i.COD_PROV, vce(cluster COD_PROV)	
	
quiet eststo:	reg `var' i.bands c.pop2021 c.psu1919_vv dlab1921 shcrop1921 ind_workers1921 literacy1911 sh_pop_1911_be6 c.mountain_perc i.COD_PROV, cl(COD_PROV)	
}
esttab using "referendum2020.tex", keep(1.bands) replace b(%8.3f) se(%8.3f) noomitted nocons nobaselev stats(N, fmt(0 2)) star(+ 0.10 * 0.05 ** 0.01 *** 0.001)

*************************************************************************
* Table A10: Voting in the 2022 referendum (turnout)

est clear
foreach var of varlist ref2022q1_turnout ref2022q2_turnout ref2022q3_turnout ref2022q4_turnout ref2022q5_turnout {

quiet eststo:	reg `var' i.bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc i.COD_PROV, vce(cluster COD_PROV)	

quiet eststo:	reg `var' i.bands c.pop2021 c.psu1919_vv dlab1921 shcrop1921 ind_workers1921 literacy1911 sh_pop_1911_be6 c.mountain_perc i.COD_PROV, cl(COD_PROV)	

}
esttab using "referendum2022_turnout.tex", keep(1.bands) replace b(%8.3f) se(%8.3f) noomitted nocons nobaselev stats(N, fmt(0 2)) star(+ 0.10 * 0.05 ** 0.01 *** 0.001)

*************************************************************************
* Table A11: Voting in the 2022 referendum (vote YES)

est clear
foreach var of varlist ref2022q1_yes ref2022q2_yes ref2022q3_yes ref2022q4_yes ref2022q5_yes {

quiet eststo:	reg `var' i.bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc i.COD_PROV, vce(cluster COD_PROV)	

quiet eststo:	reg `var' i.bands c.pop2021 c.psu1919_vv dlab1921 shcrop1921 ind_workers1921 literacy1911 sh_pop_1911_be6 c.mountain_perc i.COD_PROV, cl(COD_PROV)	
}
esttab using "referendum2022_vote.tex", keep(1.bands) replace b(%8.3f) se(%8.3f) noomitted nocons nobaselev stats(N, fmt(0 2)) star(+ 0.10 * 0.05 ** 0.01 *** 0.001)

*************************************************************************
* Table A12: Vote in 2022 national elections (pre-war controls) 

est clear
foreach var of varlist FDI_sh lega_sh FI_sh PD_sh verdisinistra_sh M5S_sh turnout {
	
quiet eststo:	reg `var' i.bands c.pop2021 c.psu1919_vv dlab1921 shcrop1921 ind_workers1921 literacy1911 sh_pop_1911_be6 c.mountain_perc i.COD_PROV, cl(COD_PROV)	
}
esttab using "elections2022_prewar.tex", keep(1.bands) replace b(%8.3f) se(%8.3f) noomitted nocons nobaselev stats(N, fmt(0 2)) star(+ 0.10 * 0.05 ** 0.01 *** 0.001)

*************************************************************************
* Table A13: Vote in the 2022 national elections (baseline controls)

est clear
foreach var of varlist FDI_sh lega_sh FI_sh PD_sh verdisinistra_sh M5S_sh turnout {
	
quiet eststo:	reg `var' i.bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc i.COD_PROV, vce(cluster COD_PROV)	
}
esttab using "elections2022_baseline.tex", keep(1.bands) replace b(%8.3f) se(%8.3f) noomitted nocons nobaselev stats(N, fmt(0 2)) star(+ 0.10 * 0.05 ** 0.01 *** 0.001)

*************************************************************************
* Table A14: Interaction bands x medals for military gallantry

est clear 

eststo: nbreg numerofirme i.bands##i.medaglia c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc i.COD_PROV, cl(COD_PROV) 

eststo: nbreg numerofirme i.bands##i.medaglia c.pop2021 c.psu1919_vv dlab1921 shcrop1921 ind_workers1921 literacy1911 sh_pop_1911_be6 c.mountain_perc i.COD_PROV, cl(COD_PROV) 

esttab using "medal_interaction.tex", replace b(%8.3f) se(%8.3f) noomitted nocons nobaselev stats(N, fmt(0 2)) keep(1.bands 1.medaglia 1.bands#1.medaglia) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label

*************************************************************************
* Table A15: Model controlling for Covid pandemic intensity
est clear

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc c.covid_wmean_w1 c.covid_wmean_w2 i.COD_REG if pop2021 < 25000 & resistent_region == 1, cl(COD_PROV)

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc c.covid_wmean_w1##c.covid_wmean_w2 i.COD_REG if pop2021 < 25000 & resistent_region == 1, cl(COD_PROV)

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc c.covid_wmax_w1 c.covid_wmax_w2 i.COD_REG if pop2021 < 25000 & resistent_region == 1, cl(COD_PROV)

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc c.covid_wmax_w1##c.covid_wmax_w2 i.COD_REG if pop2021 < 25000 & resistent_region == 1, cl(COD_PROV)

esttab using "covid.tex", replace b(%8.3f) se(%8.3f) noomitted nocons nobaselev stats(N, fmt(0 2)) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label keep(bands)

*************************************************************************
* Table A16: Models accounting for organizers' networks

est clear

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc c.dist_to_stazzema_km i.COD_PROV if pop2021 < 25000 & resistent_region == 1, cl(COD_PROV)

eststo: nbreg numerofirme bands c.pop2021 c.densita_x_km2 c.old_11 c.Tassodidisoccupazione c.perc_man_01 c.perc_agr_01 c.share_university_cens2011 c.digital_divide_rf c.mountain_perc i.COD_PROV if pop2021 < 25000 & resistent_region == 1 & regione != "Toscana", cl(COD_PROV)

esttab using "network_stazzema.tex", replace b(%8.3f) se(%8.3f) noomitted nocons nobaselev stats(N, fmt(0 2)) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label keep(bands)









